﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CadastroImoveis.aspx.cs"
    Inherits="web.admin.CadastroImoveis" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
     <title>Área Restrita</title>
</head>
<link href="../include/css/style.css" rel="stylesheet" type="text/css" />
<body>
    <form id="form1" runat="server">
    <br />
    <center>
        <table width="400">
            <tr>
                <td style="vertical-align: middle;">
                    <center>
                        <img src="../images/admin/icone_Imovel.png" />
                    </center>
                </td>
                <td style="vertical-align: middle; width: 80%; text-align: left">
                    <h2>
                        <b>Cadastro de Imovel</b></h2>
                </td>
            </tr>
        </table>
    </center>
    <br />
    <br />
    <center>
        <div style="overflow: auto; height: 469px">
            <center>
                <table border="0" cellpadding="4" cellspacing="0" width="500">
                    <tr>
                        <td>
                            <table border="0" cellpadding="4" cellspacing="4" align="left" width="100%">
                                <tr>
                                    <td colspan="2" style="color: White; background-color: #507CD1;">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label3" runat="server" Text="Código:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox class="input-text" ID="txtCodigoNatura" runat="server"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="lblData" runat="server" Text="Titulo do Imovel:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox class="input-text" ID="txtTituloImovel" runat="server" Width="500px"></asp:TextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label6" runat="server" Text="Categoria:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:DropDownList ID="cboCategoria" runat="server">
                                        </asp:DropDownList>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label1" runat="server" Text="Texto:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <textarea runat="server" name="txtTexto" id="txtTexto" cols="80" rows="10"></textarea>
                                        <%--<asp:TextBox ID="txtTexto" Width="400" runat="server"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtTexto"
                                ErrorMessage="Link é obrigatório"></asp:RequiredFieldValidator>--%>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label4" runat="server" Text="Preço:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox class="input-text" ID="txtPreco" runat="server" Width="100"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtPreco"
                                            ErrorMessage="Preço deve ser informado" ForeColor="Red"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtPreco"
                                            ErrorMessage="Digite um preço válido" ForeColor="Red" ValidationExpression="^[-]?(\d{1,3},?(\d{3},?)*\d{3}(\,\d{0,2})?|\d{1,3}(\,\d{0,2})?|\,\d{1,2}?)$"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label5" runat="server" Text="Quantidade:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:TextBox class="input-text" ID="txtQuantidade" runat="server" Width="100"></asp:TextBox>
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtQuantidade"
                                            ErrorMessage="Quantidade deve ser informada" ForeColor="Red"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtQuantidade"
                                            ErrorMessage="Digite uma quantidade válida" ForeColor="Red" ValidationExpression="[0-9]+"></asp:RegularExpressionValidator>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="lblTextoImovel" runat="server" Text="Imagem:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:FileUpload ID="uplFoto" runat="server" />
                                        <br />
                                        <asp:Image class="input-text" ID="imgUpload" runat="server" Visible="false" Height="190" />
                                    </td>
                                </tr>
                                <tr>
                                    <td align="left">
                                        <asp:Label ID="Label2" runat="server" Text="Ativo:"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:CheckBox ID="chkAtivo" Checked="true" runat="server" />
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <asp:HiddenField ID="hdnCodigo" runat="server" />
                                        <asp:HiddenField ID="hdnCaminhoImagem" runat="server" />
                                    </td>
                                    <td align="left">
                                        <asp:Button ID="btnSalvar" runat="server" Text="Salvar" OnClick="btnSalvar_Click" />
                                        <asp:Button ID="btnVoltar" runat="server" Text="Voltar" OnClick="btnVoltar_Click"
                                            CausesValidation="False" />
                                    </td>
                                </tr>
                            </table>
                            <br />
                            <br />
                            <br />
                            <br />
                            <asp:Label ID="lblMensagem" runat="server" Text=""></asp:Label>
                        </td>
                    </tr>
                </table>
            </center>
        </div>
    </form>
</body>
</html>
